package com.example.et.entity;

import java.text.SimpleDateFormat;

import com.baomidou.mybatisplus.annotation.TableName;

@TableName("worker")
public class Worker {
    private int id;
    private java.sql.Date time;
    private String orders;
    private String pay;
    private String name;
    private String sex;
    private int age;
    private String nation;
    private String politics;
    private String che;
    private String gong;
    private String ban;
    private String jobTitle;
    private String jobPlus;
    private String identity;
    private java.sql.Date birthday;
    private java.sql.Date timeJoin;
    private java.sql.Date timeInsure;
    private String type;
    private String educationOld;
    private String educationNew;
    private String graduation;
    private String major;
    private String typeStudy;
    private String graduationId;
    private String technician;
    private java.sql.Date inTechnician;
    private java.sql.Date outTechnician;
    private String recruit;
    private String phone;
    private String fc;
    private double wageBase;
    private double wagePlus;
    private String firstDegree;
    private String firstSchool;
    private String firstMajor;

    public Worker() {
    }

    public String formatDateToString(java.sql.Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(date);
    }

    public java.sql.Date formatStringToDate(String dateString) {
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            java.util.Date utilDate = sdf.parse(dateString);
            return new java.sql.Date(utilDate.getTime());
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTime() {
        return formatDateToString(time);
    }

    public void setTime(String time) {
        this.time = formatStringToDate(time);
    }

    public String getOrder() {
        return orders;
    }

    public void setOrder(String orders) {
        this.orders = orders;
    }

    public String getPay() {
        return pay;
    }

    public void setPay(String pay) {
        this.pay = pay;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public String getPolitics() {
        return politics;
    }

    public void setPolitics(String politics) {
        this.politics = politics;
    }

    public String getChe() {
        return che;
    }

    public void setChe(String che) {
        this.che = che;
    }

    public String getGong() {
        return gong;
    }

    public void setGong(String gong) {
        this.gong = gong;
    }

    public String getBan() {
        return ban;
    }

    public void setBan(String ban) {
        this.ban = ban;
    }

    public String getJobTitle() {
        return jobTitle;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    public String getJobPlus() {
        return jobPlus;
    }

    public void setJobPlus(String jobPlus) {
        this.jobPlus = jobPlus;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getBirthday() {
        return formatDateToString(birthday);
    }

    public void setBirthday(String birthday) {
        this.birthday = formatStringToDate(birthday);
    }

    public String getTimeJoin() {
        return formatDateToString(timeJoin);
    }

    public void setTimeJoin(String timeJoin) {
        this.timeJoin = formatStringToDate(timeJoin);
    }

    public String getTimeInsure() {
        return formatDateToString(timeInsure);
    }

    public void setTimeInsure(String timeInsure) {
        this.timeInsure = formatStringToDate(timeInsure);
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getEducationOld() {
        return educationOld;
    }

    public void setEducationOld(String educationOld) {
        this.educationOld = educationOld;
    }

    public String getEducationNew() {
        return educationNew;
    }

    public void setEducationNew(String educationNew) {
        this.educationNew = educationNew;
    }

    public String getGraduation() {
        return graduation;
    }

    public void setGraduation(String graduation) {
        this.graduation = graduation;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getTypeStudy() {
        return typeStudy;
    }

    public void setTypeStudy(String typeStudy) {
        this.typeStudy = typeStudy;
    }

    public String getGraduationId() {
        return graduationId;
    }

    public void setGraduationId(String graduationId) {
        this.graduationId = graduationId;
    }

    public String getTechnician() {
        return technician;
    }

    public void setTechnician(String technician) {
        this.technician = technician;
    }

    public String getInTechnician() {
        return formatDateToString(inTechnician);
    }

    public void setInTechnician(String inTechnician) {
        this.inTechnician = formatStringToDate(inTechnician);
    }

    public String getOutTechnician() {
        return formatDateToString(outTechnician);
    }

    public void setOutTechnician(String outTechnician) {
        this.outTechnician = formatStringToDate(outTechnician);
    }

    public String getRecruit() {
        return recruit;
    }

    public void setRecruit(String recruit) {
        this.recruit = recruit;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getFc() {
        return fc;
    }

    public void setFc(String fc) {
        this.fc = fc;
    }

    public double getWageBase() {
        return wageBase;
    }

    public void setWageBase(double wageBase) {
        this.wageBase = wageBase;
    }

    public double getWagePlus() {
        return wagePlus;
    }

    public void setWagePlus(double wagePlus) {
        this.wagePlus = wagePlus;
    }

    public String getFirstDegree() {
        return firstDegree;
    }

    public void setFirstDegree(String firstDegree) {
        this.firstDegree = firstDegree;
    }

    public String getFirstSchool() {
        return firstSchool;
    }

    public void setFirstSchool(String firstSchool) {
        this.firstSchool = firstSchool;
    }

    public String getFirstMajor() {
        return firstMajor;
    }

    public void setFirstMajor(String firstMajor) {
        this.firstMajor = firstMajor;
    }

    

    @Override
    public String toString() {
        return "Worker{" +
                "id=" + id +
                ", time=" + time +
                ", orders=" + orders +
                ", pay='" + pay + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", nation='" + nation + '\'' +
                ", politics='" + politics + '\'' +
                ", che='" + che + '\'' +
                ", gong='" + gong + '\'' +
                ", ban='" + ban + '\'' +
                ", jobTitle='" + jobTitle + '\'' +
                ", jobPlus='" + jobPlus + '\'' +
                ", identity='" + identity + '\'' +
                ", birthday=" + birthday +
                ", timeJoin=" + timeJoin +
                ", timeInsure=" + timeInsure +
                ", type='" + type + '\'' +
                ", educationOld='" + educationOld + '\'' +
                ", educationNew='" + educationNew + '\'' +
                ", graduation='" + graduation + '\'' +
                ", major='" + major + '\'' +
                ", typeStudy='" + typeStudy + '\'' +
                ", graduationId='" + graduationId + '\'' +
                ", technician='" + technician + '\'' +
                ", inTechnician=" + inTechnician +
                ", outTechnician=" + outTechnician +
                ", recruit='" + recruit + '\'' +
                ", phone='" + phone + '\'' +
                ", fc='" + fc + '\'' +
                ", wageBase=" + wageBase +
                ", wagePlus=" + wagePlus +
                ", firstDegree='" + firstDegree + '\'' +
                ", firstSchool='" + firstSchool + '\'' +
                ", firstMajor='" + firstMajor + '\'' +
                '}';
    }
}
